Running programs from the command line


Introduction to Bioinformatics - Module 2

Nina Norgren

Programs

  • All commands so far are technically programs on their own.

  • ls, cat, head, etc

  • Other programs can also be installed and run from the command line

    • inkscape
    • vlc
    • htop

What is a Package Manager?

  • A tool that simplifies the process of installing, updating, configuring, and removing software on your computer.

Why Use a Package Manager?


Efficiency: automate handling of software packages, no manual installations and updates

Dependency Resolution: manage dependencies

Package Management on Debian based systems (linux)


  • APT (Advanced Package Tool) is a package management system used in Debian-based distributions

Package Management on Debian based systems (linux)


  • sudo apt install - Install a specific package
sudo apt install firefox


sudo: grants permission to make changes on your computer. Ensures necessary authority to modify system settings and files. Requires your password

Package Management on macOS


  • On macOS, Homebrew is a popular package manager

  • Homebrew simplifies the installation of software on macOS

Installing Homebrew


  • To install Homebrew, open Terminal and run the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Installing Packages with Homebrew


Once Homebrew is installed, you can use it to install packages

brew install bcftools
brew install tabix


Homebrew will handle dependencies and set up the programs for you

Running programs

  • What does a certain program do?
man unzip

Running programs

  • What does a certain program do?
man unzip

Running programs

  • What command line options does the program have?
unzip -h

Running programs

  • What command line options does the program have?
unzip -h

Use command line option -h

Running programs

  • Using command line options
unzip my_compressed_files.zip -d my_files/